<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>图片翻转</title>
    <script src="../jquery-3.1.1.js"></script>
    <style>
        h2{
            text-align: center;
            margin: 0;
            padding: 0;
            height: 60px;
            line-height: 60px;
            border-bottom: 2px solid black;
        }
        .outer{
            width: 300px;
            height: 420px;
            margin: 100px auto;
            border: 1px solid gray;
            box-shadow: 0 0 1px gray; 
        }
        ul,li{
            margin: 0;
            padding: 0;
            list-style: none;
            
        }
        li{
            float: left;
            margin-left: 20px;
            margin-top: 10px;
            position: relative;
        }
        ul>li>div{
            background-color: orange;
            width: 120px;
            height: 10px;
            text-align: center;
            margin-top: 10px;
            position: absolute;
            top: 27px;
            left: 0;
            /*display: none;*/
        }
    </style>

</head>
<body>
    <div class="outer">
        <h2>热门品牌推荐</h2>
        <ul>
            <li><img src="../images/11.jpg" alt=""><div class="bg">肌肤</div></li>
            <li><img src="../images/22.jpg" alt=""><div class="bg">肌肤</div></li>
            <li><img src="../images/33.jpg" alt=""><div class="bg">肌肤</div></li>
            <li><img src="../images/44.jpg" alt=""><div class="bg">肌肤</div></li>
            <li><img src="../images/55.jpg" alt=""><div class="bg">肌肤</div></li>
            <li><img src="../images/66.jpg" alt=""><div class="bg">肌肤</div></li>
            <li><img src="../images/77.jpg" alt=""><div class="bg">肌肤</div></li>
            <li><img src="../images/88.jpg" alt=""><div class="bg">肌肤</div></li>
            <div style="clear: both"></div>
        </ul>
        
    </div>
</body>
</html>
<script>
    $('ul li').hover(function(){
        $(this).find('img').animate({top:37,height:10,width:120},1000);
        $(this).find('.bg').animate({top:0,height:75},1000);
    },function(){

    });
</script>